<?php

use App\Models\VipBaseInfo;

return [
    'title'   => 'VIP分类',
    'heading' => 'VIP分类',
    'single'  => 'VIP分类',
    'model'   => VipBaseInfo::class,

    'columns' => [
        'id' => [
            'title' => 'ID',
        ],

        'name' => [
            'title'    => '名称',
            'sortable' => false,
        ],

        'price' => [
            'title'    => '价值(RMB)',
            'sortable' => false,
        ],

        'free_homework_help_count' => [
            'title' => '免D币作业帮次数',
        ],

        'homework_help_discount' => [
            'title' => '作业帮打折值',
        ],
        'free_algorithm_sources_count' => [
            'title' => '免D币算法源码下载次数',
        ],

        'algorithm_sources_discount' => [
            'title'  => '算法源码折扣',
        ],
        'free_resource_point_count' => [
            'title' => '免积分资源下载次数',
        ],
        'resource_discount' => [
            'title' => '资源积分折扣',
        ],
        'is_exempt_ads' => [
            'title' => '是否显示广告',
        ],
        'date_type' => [
            'title' => '有效时间类型',
            'output' => function ($value) {
                if($value == 1)
                {
                    return '天';
                }
                elseif($value == 2)
                {
                    return '月';
                }
                elseif($value == 3)
                {
                    return '季度';
                }
                elseif($value == 4)
                {
                    return '年';
                }
            },
        ],

        'date_length' => [
            'title' => '有效时间',
        ],

        'privilege_str' => [
            'title' => '权限说明',
        ],
        'operation' => [
            'title'  => '管理',
            'output' => function ($value, $model) {
                return $value;
            },
            'sortable' => false,
        ],
    ],
    'edit_fields' => [
        'name' => [
            'title'    => '名称',
        ],

        'price' => [
            'title'    => '价值(RMB)',
        ],

        'free_homework_help_count' => [
            'title' => '免D币作业帮次数',
        ],

        'homework_help_discount' => [
            'title' => '作业帮打折值',
        ],
        'free_algorithm_sources_count' => [
            'title' => '免D币算法源码下载次数',
        ],

        'algorithm_sources_discount' => [
            'title'  => '算法源码折扣',
        ],
        'free_resource_point_count' => [
            'title' => '免积分资源下载次数',
        ],
        'resource_discount' => [
            'title' => '资源积分折扣',
        ],

        'is_exempt_ads' => [
            'title' => '是否显示广告',
        ],

        'date_type' => [
            'title' => '有效时间类型,1:天,2:月,3:季度,4:年',
        ],

        'date_length' => [
            'title' => '有效时间',
        ],
        'privilege_str' => [
            'title' => '权限说明',
        ],
    ],

    'filters' => [
        'id' => [
            'title' => 'ID',
        ],
        'name' => [
            'title'    => '名称',
        ],

        'price' => [
            'title'    => '价值(RMB)',
        ],

        'date_type' => [
            'title' => '有效时间类型',
        ],

        'date_length' => [
            'title' => '有效时间类型,1:天,2:月,3:季度,4:年',
        ],
    ],

];
